// 创建一个路由器，并暴露出去
// 第一步：引入createRouter
import {createRouter, createWebHistory} from 'vue-router'
// 引入一个一个可能要呈现组件


import Login from "@/views/Login.vue";
import Layout from "@/views/layout.vue";

import Researchers from "@/views/Researchers.vue";

//创建路由器
const router = createRouter({
    history: createWebHistory(),
    routes: [
        {path: '/login', component: Login},
        {
            path: '/', component: Layout, children: [
                {path: '/researchers', component: Researchers}
            ]
        }
    ]
})

// 暴露出去router
export default router